package com.maimao.model.user;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.*;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author MaoLin Wang
 * @date 2020/11/28 11:03 上午
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@Builder
@TableName("mm_shop")
public class Shop implements Serializable {
    private static final long serialVersionUID = 2854948624996802870L;

    @TableId(type = IdType.ASSIGN_ID)
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long id;

    @TableField("`name`")
    private String name;

    @TableField("`social`")
    private Integer social;

    @TableField("`owner`")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long owner;

    @TableField("`create_time`")
    private LocalDateTime createTime;

    @TableField("`brand_id`")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    private Long brandId;

    @TableField("`qr_code`")
    private String qrCode;

    @Override
    public String toString() {
        return "Shop{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", social=" + social +
                ", owner=" + owner +
                ", createTime=" + createTime +
                ", brandId=" + brandId +
                ", qrCode='" + qrCode + '\'' +
                '}';
    }
}
